import request from '@/utils/request'

export default {
  // 1. 条件查询带分页
  search(page,pageSize,data){
    return request({
      url: `/emp/search/${page}/${pageSize}`,
      method:'post',
      data
    })
  },
  // 2. 添加/修改
  save(url,data,method){
    return request({
      url,
      method,
      data,
    })
  },
  // 3. 根据员工id查询员工信息
  findById(id){
    return request({
      url:'/emp/findById/' + id,
      method:'get',
    })
  },
  // 4. 单个或批量删除员工
  removeEmp(eids){
    return request({
      url:'/emp/remove/' + eids,
      method:'delete',
    })
  }
}
